[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 DATE   Type

 Function
  Declare one or more variables of type date.

 Syntax
  DATE var|arr(s[,s[,s]])[,var|arr(s[,s[,s]])]

  var  - The name of a variable to declare.  Must start with a letter
         [A-Z] which may be followed by letters, digits [0-9] or the
         underscore [_].  May be of any length but only the first 32
         characters are used.
  arr  - The name of an array variable to declare.  The same naming
         conventions as var are used.
   s   - The size (0-based) of an array variable dimension.  Any
         constant integer expression is allowed.

 Remarks
  DATE variables are stored as julian dates.  Valid dates are 0 (a special
  case to represent an invalid date) and 1 (1 JAN 1900) through 36524
  (31 DEC 1999) through 65535 (5 JUN 2079).  It is stored internally as a
  two byte unsigned integer.  If a DATE is assigned to or from an INTEGER
  type then the julian date (0-65535) is assigned.  If a DATE is assigned
  to a STRING type then it is automatically converted to the following
  format: "MM/DD/YY", where MM is the two digit month (01-12), DD is the
  two digit day of the month (01-31), and YY is the two digit year (00-99).
  If a foreign language is in use that uses a different date format
  (for example, "DD/MM/YY" or "YY.MM.DD") then that will be taken into
  account.  If a STRING is assigned to a DATE then PPL will do it's best
  to convert the string back to the appropriate julian date.  However,
  dates before 1980 will not be handled correctly because only a two digit
  year is used in strings.  All other types, when assigned to or from a
  DATE, will be converted to an INTEGER first before being assigned to or
  from the DATE type.

 Examples
  DATE dob, today, range(2), leapYears(50)

See Also: BOOLEAN INTEGER MONEY STRING TIME
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson